03. Terminal Workspaces
Terminal Workspaces
Below is a terminal workspace, which is an in-browser IDE you can use to develop your code. The left pane shows your files, the top right pane is the editor, and the bottom right pane is a Linux terminal. These will be used for exercises throughout the course.
Terminals provide a full Bash shell that you can use to install or update software packages, fetch updates from GitHub repositories, or run any other terminal commands.
Some example code is in the main.cpp
file that is displayed. You can compile and run the code by clicking "New Terminal", and then executing the following two terminal commands:
g++ main.cpp
./a.out
You should see "Hello World" printed to the screen after running these commands. And don't worry, you will learn what these commands do in the Foundations course, and we will remind you of them when they are needed!
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity, so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: generic
- Opened files (when workspace is loaded): n/a
-
userCode:
export CXX=g++-7
export CXXFLAGS=-std=c++17
g++() {
/usr/bin/g++-7 -std=c++17 "$1"
}
export -f g++
Just as with Notebook Workspaces, if you need more room to work in the editor, you can click the "Expand" button in the lower left corner:
You can also click on the "hamburger" button in the upper left of the classroom to collapse the sidebar for more room:
Note: Just as with Notebook Workspaces, Terminal Workspaces will save your work automatically.